// const { SyncWaterfallHook }  = require('tapable')
const SyncWaterfallHook = require('./SyncWaterfallHook')

class Lesson {
  constructor(){
    this.hooks = {
      arch: new SyncWaterfallHook(['name'])
    }
  }
  tap(){
    this.hooks.arch.tap('react', function(name){
      console.log('react',name);
      return 'react初学'
    })
    this.hooks.arch.tap('node', function(name){
      console.log('node2',name);
      return 'node初学'
    })
    this.hooks.arch.tap('react', function(name){
      console.log('react',name);
    })
  }
  start(){
    this.hooks.arch.call('ldx')
  }
}
let l = new Lesson
l.tap()
l.start()